package com.infotel.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;

import com.infotel.media.DVD;
import com.infotel.test.FenetreDVD;

public class SupprimerListener implements ActionListener {
    int index;
    int row;
    Connection conn;
    FenetreDVD fenetreDVD;
    public SupprimerListener(int index, int row, Connection conn,FenetreDVD fenetreDVD) {
        this.index = index;
        this.row = row;
        this.conn = conn;
        this.fenetreDVD=fenetreDVD;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        DVD.supprimer(conn, index);
        fenetreDVD.afficherTableauDVD(conn);
    }

}
